/*    */ package xin.petstore.framework.orm.mybatis.paginator.dialect;
/*    */ 
/*    */ import com.eloancn.framework.orm.mybatis.paginator.domain.PageBounds;
/*    */ import org.apache.ibatis.mapping.MappedStatement;
/*    */ 
/*    */ public class PostgreSQLDialect extends Dialect
/*    */ {
/*    */   public PostgreSQLDialect(MappedStatement mappedStatement, Object parameterObject, PageBounds pageBounds)
/*    */   {
/* 13 */     super(mappedStatement, parameterObject, pageBounds);
/*    */   }
/*    */ 
/*    */   protected String getLimitString(String sql, String offsetName, int offset, String limitName, int limit) {
/* 17 */     StringBuffer buffer = new StringBuffer(sql.length() + 20).append(sql);
/* 18 */     if (offset > 0) {
/* 19 */       buffer.append(" limit ? offset ?");
/* 20 */       setPageParameter(limitName, Integer.valueOf(limit), Integer.class);
/* 21 */       setPageParameter(offsetName, Integer.valueOf(offset), Integer.class);
/*    */     }
/*    */     else {
/* 24 */       buffer.append(" limit ?");
/* 25 */       setPageParameter(limitName, Integer.valueOf(limit), Integer.class);
/*    */     }
/* 27 */     return buffer.toString();
/*    */   }
/*    */ }

/* Location:           C:\java代码反编译器\core-1.1.4.jar
 * Qualified Name:     com.eloancn.framework.orm.mybatis.paginator.dialect.PostgreSQLDialect
 * JD-Core Version:    0.6.0
 */